﻿﻿using System.Data.Entity;

namespace AtlasWichita.Models
{
    public class Customer
    {
        public Quiz customerQuiz;
        public bool testTaken { get; set; }
        public int UserID { get; set; }
        public int Age { get; set; }
        public char Sex { get; set; }
        public int Race { get; set; }
        public int Education { get; set; }
        public int MaritalStatus { get; set; }
        public int Income { get; set; }
        public int Children { get; set; }
        public CustomerAdjective Formal { get; set; }
        public CustomerAdjective Conformist { get; set; }
        public CustomerAdjective BlueCollar { get; set; }
        public CustomerAdjective Simple { get; set; }
        public CustomerAdjective Trendy { get; set; }
        public CustomerAdjective Gritty { get; set; }
        public CustomerAdjective Independent { get; set; }
        public CustomerAdjective Local { get; set; }
        public CustomerAdjective Energetic { get; set; }
        public CustomerAdjective Modern { get; set; }
        public CustomerAdjective Elegant { get; set; }
        public CustomerAdjective adjective1 { get; set; }
        public CustomerAdjective adjective2 { get; set; }
        public CustomerAdjective adjective3 { get; set; }
        public string highestAdjective { get; set; }
        public string secondHighestAdjective { get; set; }
        public string thirdHighestAdjective { get; set; }

        public void addToPoints(int formal, int conformist, int blueCollar, int simple, int trendy, int gritty,
            int independent, int local, int energetic, int modern, int elegant)
        {

            this.Formal.totalPoints += formal;
            this.Conformist.totalPoints += conformist;
            this.BlueCollar.totalPoints += blueCollar;
            this.Simple.totalPoints += simple;
            this.Trendy.totalPoints += trendy;
            this.Gritty.totalPoints += gritty;
            this.Independent.totalPoints += independent;
            this.Local.totalPoints += local;
            this.Energetic.totalPoints += energetic;
            this.Modern.totalPoints += modern;
            this.Elegant.totalPoints += elegant;
        }

        public Customer (int formal, int conformist, int blueCollar, int simple, int trendy, int gritty,
             int independent, int local, int energetic, int modern, int elegant)
        {
            this.Formal.totalPoints = formal;
            this.Conformist.totalPoints = conformist;
            this.BlueCollar.totalPoints = blueCollar;
            this.Simple.totalPoints = simple;
            this.Trendy.totalPoints = trendy;
            this.Gritty.totalPoints = gritty;
            this.Independent.totalPoints = independent;
            this.Local.totalPoints = local;
            this.Energetic.totalPoints = energetic;
            this.Modern.totalPoints = modern;
            this.Elegant.totalPoints = elegant;
        }

        public Customer()
        {

        }
    }

    public class UserDBContext : DbContext
    {
        public DbSet<Customer> Customers { get; set; }
    }

}